//
//  search_labelCell.m
//  SoundPill
//
//  Created by 宋鹏鹏 on 15/4/8.
//  Copyright (c) 2015年 宋旭东. All rights reserved.
//

#import "search_labelCell.h"
#import "plaza_viewModel.h"
#define kDeviceWidth [UIScreen mainScreen].bounds.size.width
#define kLabelWidth [UIScreen mainScreen].bounds.size.width - 100
#define kLabelHeight 20

@implementation search_labelCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self initSubViews];
        self.backgroundColor=[UIColor clearColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        
    }
    return self;
}

- (void)initSubViews
{
    //
    _signLabel = [[UILabel alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:_signLabel];
    
    //
    _worksCount = [[UILabel alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:_worksCount];
    
    
}
- (void)layoutSubviews
{
    [super layoutSubviews];

    //
    _signLabel.frame = CGRectMake(17, 10, kLabelWidth, kLabelHeight);
    _signLabel.backgroundColor=[UIColor whiteColor];
    _signLabel.font = [UIFont boldSystemFontOfSize:15];
    _signLabel.textColor = [UIColor blackColor];
    //_signLabel.text=@"摇滚";
    _signLabel.text = self.plazadataModel.tagName;
    
    // 名字
    _worksCount.frame = CGRectMake(17, _signLabel.bottom+2, kLabelWidth, kLabelHeight);
    _worksCount.backgroundColor = [UIColor whiteColor];
    _worksCount.font = [UIFont systemFontOfSize:13];
    _worksCount.textColor = [UIColor lightGrayColor];
    //_worksCount.text=@"已有576个作品";
    _worksCount.text= [NSString stringWithFormat:@"已有%@个作品",self.plazadataModel.tagCount];
    
    //分隔线
    UIImageView *downDivider = [[UIImageView alloc] initWithFrame:CGRectMake(3, 58.6, kDeviceWidth-6, 0.8)];
    downDivider.image = [UIImage imageNamed:@"gray_line"];
    
    [self.contentView addSubview:downDivider];
    
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
